




var _oAttrUtlMessages =
{
sCannotDeleteSystemAttribute:	LOCID_ATTRUTL_CANTDELSYSATTR,
sConfirmAttributeDelete:		LOCID_ATTRUTL_CONFIRMDELATTR,
sCreatingAttribute:				LOCID_ATTRUTL_CREATINGATTR,
sUpdatingAttribute:				LOCID_ATTRUTL_UPDATINGATTR,
sDeletingAttribute:				LOCID_ATTRUTL_DELETINGATTR
};






var _oAttrUtlConst =
{

attributeId:						"attributeId",


sCustomizationCommandObject:		"SystemCustomization",
sCreateAttributeCommand:			"CreateAttribute",
sUpdateAttributeCommand:			"UpdateAttribute",
sDeleteAttributeCommand:			"DeleteAttribute",
sCommandParameterName:				"data"
};











function createAttribute(sDataXml, fCallback, oCallbackParams)
{
var oCommand = new RemoteCommand(_oAttrUtlConst.sCustomizationCommandObject, _oAttrUtlConst.sCreateAttributeCommand);
oCommand.SetParameter(_oAttrUtlConst.sCommandParameterName, sDataXml);
executeRemoteCommand(oCommand, _oAttrUtlMessages.sCreatingAttribute, fCallback, oCallbackParams);
}




function updateAttribute(sDataXml, fCallback, oCallbackParams)
{
var oCommand = new RemoteCommand(_oAttrUtlConst.sCustomizationCommandObject, _oAttrUtlConst.sUpdateAttributeCommand);
oCommand.SetParameter(_oAttrUtlConst.sCommandParameterName, sDataXml);
executeRemoteCommand(oCommand, _oAttrUtlMessages.sUpdatingAttribute, fCallback, oCallbackParams);
}




function deleteAttribute(sAttributeId, bCustomAttribute, fCallback, oCallbackParams)
{

if (!bCustomAttribute)
{
alert(_oAttrUtlMessages.sCannotDeleteSystemAttribute);
return;
}


if (!confirm(_oAttrUtlMessages.sConfirmAttributeDelete))
{
return;
}


var oCommand = new RemoteCommand(_oAttrUtlConst.sCustomizationCommandObject, _oAttrUtlConst.sDeleteAttributeCommand);
oCommand.SetParameter(_oAttrUtlConst.attributeId, sAttributeId);
executeRemoteCommand(oCommand, _oAttrUtlMessages.sDeletingAttribute, fCallback, oCallbackParams);
}
